package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import com.ticket.sass.common.entity.tenant.enums.CommodityDispatchMode;
import com.ticket.sass.common.entity.tenant.enums.CommodityDispatchStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author 朱其鹏
 * @date 2024/4/9 20:40
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("order_commodity_dispatches")
public class OrderCommodityDispatchEntity {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String place;
    private CommodityDispatchMode mode;
    private CommodityDispatchStatus status;
    private Integer printNum;
    private Long orderIdAsCommodity;
    private Long orderIdAsTicket;
    private Long orderIdAsTakeTicket;
    private Long userId;
    
    @ApiModelProperty(value = "影院 id")
    private Long cinemaId;
    
    @ApiModelProperty(value = "租户 id")
    private Long tenantId;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableLogic(value = "null", delval = "now()")
    @TableField(select = false)
    private LocalDateTime deletedAt;

    @TableField(exist = false)
    private OrderEntity orderAsTicket;

    @TableField(exist = false)
    private TakeTicketOrderEntity orderAsTakeTicket;
}